<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="product" tagdir="/WEB-INF/tags/product"%>
<%@ taglib prefix="system" tagdir="/WEB-INF/tags/system"%>

<c:choose>
	<c:when test="${shoppingcart != null && (not empty shoppingcart.shoppingCartItems)}">
		<ul class="items_wrap clearfix">
			<c:forEach items="${shoppingcart.productItems}" var="item" varStatus="status">
				<li>
					<ul class="items">
						<li>
							<product:productImage product="${item.productSku.product}" sizeType="s0" linkClass="img"/>
						</li>
						<li>
							<h4>
								<a class="txt" href="<product:productUrl product="${item.productSku.product}"/>">${item.productSku.product.productName}</a>
							</h4>
							<div class="price">
								<p><ins><common:currencyFormat value="${item.discountPrice}" /> x ${item.discountQuantity}</ins></p>
							</div>
						</li>
						<li><a class="minus" href="javascript:void(0)" onclick="javascript:delProductItem('${item.productSku.productSkuCode}', function(){})"><fmt:message key="button.delete"/></a></li>
					</ul>
				</li>
			</c:forEach>
			<c:forEach items="${shoppingcart.giftCertificateItems}" var="item" varStatus="status">
				<li>
					<ul class="items">
						<li>
							<a href="javascript:void(0)" class="img"><img src="${noTxtImagePath}/coupons_bg1.png" width="58" height="58" /></a>
						</li>
						<li>
							<h4>
								<a href="javascript:void(0)"><fmt:message key="shoppingcart.gcName"/></a>
							</h4>
							<div class="price">
								<p><ins><common:currencyFormat value="${item.price}" /> X ${item.quantity}</ins></p>
							</div>
						</li>
						<li><a class="minus" href="javascript:void(0)" onclick="javascript:delGiftCertificateItem('${item.shoppingcartItemGc.shoppingcartItemGcId}', function(){});"><fmt:message key="button.delete"/></a></li>
					</ul>
				</li>
			</c:forEach>
		</ul>
		
		<div class="bottom"> 
			<b class="total"><fmt:message key="shoppingcart.total" />：<common:currencyFormat value="${shoppingcart.total}" /></b> 
			<br><a class="clear_all" href="javascript:void(0)" onclick="javascript:clearShoppingcart(function(){});" title="<fmt:message key="button.clear" />"></a>
			<a class="go_checkin" href="${ctxPath}/checkout.html" title="<fmt:message key="minicart.checkout" />"></a>
		</div>
	</c:when>
	<c:otherwise>
		<ul class="nobody">
			<fmt:message key="minicart.empty" />
		</ul>
	</c:otherwise>
</c:choose>
<div id="itemCount" style="display: none">${fn:length(shoppingcart.shoppingCartItems)}</div><!--此div在cart.js中要用到，不能够随意改动-->
